package Lesson15;

import java.util.Arrays;

public class ConstructorsExample {

	public static void main(String[] args) 
	{
		Person p1 = new Person("Ivan", 5);
		
		
		// Car c1 = new Car(true, 700);
		// System.out.println(c1.price);
		// System.out.println(c1.isSportCar);
		Car c1 = new Car("Fiesta", true, "yellow", 85000, 250);
		Person person = new Person("Ivan", "8911128658", true);
		
		person.printPerson(person);
		c1.printCar(c1);
	
		Car car1 = new Car("Fiesta", false, "Yellow", 1000, 180);
		Car car2 = new Car("Golf", false, "Black", 5000, 240);
		
		System.out.println(car1.isMoreExpensive(car2)? "Car 1 is more expensive than Car 2" : "Car 2 is more expensive than Car 1");
		
		System.out.println("The price of the car is: " + car2.calculateCarPriceForScrap(2));
		
		Person pesho = new Person();
		pesho.name = "Pesho";
		Car SL = new Car(10000);
		pesho.money = 10000;
		pesho.buyCar(SL);
		System.out.println(SL.owner.name);
		System.out.println(pesho.sellCarForScrap());
	}
	
}
